<template>
  <div id="buy">
          <div class="main">
                 <div class="mainContainer">
                      <h4>{{data.name}}<span class="deadline" v-if='data.type==1'>（期限:{{data.day}}天）</span> <span class="deadline" v-if='data.type==2'>（无期限）</span> </h4>
                      <p>{{data.desc}} </p>
                    </div>
                  </div>



                  <div class="left">
                    <div class="leftContainer inner">
                      <img :src="data.icon" alt="" onerror="this.src='./static/vip.png'">
                    </div>
                  </div>
                  <div class="right">
                    <div class="rightContainer inner">
                      <h4>¥{{data.price}}</h4>
                      <!--押金小于0且过期的显示购买  -->
                      <div v-if="deposit<=0&&isExpired==1">
                        <x-button  mini @click.native='buyMember(data.id)'>购买</x-button>
                      </div>
                      
                       <!--押金小于0且未过期的显示购买  -->
                       <div>
                         <h4 v-if="deposit<=0&&data.type==1">押金99元</h4>
                        <x-button v-if="deposit<=0&&isExpired==0" mini @click.native='buyMember(data.id)'>购买</x-button>
                       </div>
                      
                      <!--押金大于0未过期的显示续费  -->
                      <x-button v-if="deposit>0&&isExpired==0" mini @click.native='buyMember(data.id)'>续费</x-button>
                      <!--押金大于0过期的显示购买  -->
                      <x-button v-if="deposit>0&&isExpired==1" mini @click.native='buyMember(data.id)'>购买</x-button>
                    </div>

                    


                       <!-- <div v-if="deposit<=0&&data.type==1" style="padding-left:15px">
                    缴纳押金99元
                    <check-icon :disabled='true' :value.sync="pledge" type="plain">交纳押金99元</check-icon>
                     </div> -->

                  


                  </div>


                
      

                 
                 
  </div>

</template>

<script>
import vm from "./buy.js";
export default vm;
</script>

